/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uy.edu.ort.as.contenidoweb.persistencia;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Victor
 */
@Embeddable
public class TagEntradaBlogPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "idtag", nullable = false)
    private int idtag;
    @Basic(optional = false)
    @NotNull
    @Column(name = "identradablog", nullable = false)
    private int identradablog;

    public TagEntradaBlogPK() {
    }

    public TagEntradaBlogPK(int idtag, int identradablog) {
        this.idtag = idtag;
        this.identradablog = identradablog;
    }

    public int getIdtag() {
        return idtag;
    }

    public void setIdtag(int idtag) {
        this.idtag = idtag;
    }

    public int getIdentradablog() {
        return identradablog;
    }

    public void setIdentradablog(int identradablog) {
        this.identradablog = identradablog;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idtag;
        hash += (int) identradablog;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TagEntradaBlogPK)) {
            return false;
        }
        TagEntradaBlogPK other = (TagEntradaBlogPK) object;
        if (this.idtag != other.idtag) {
            return false;
        }
        if (this.identradablog != other.identradablog) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "uy.edu.ort.as.contenidoweb.persistencia.TagEntradaBlogPK[ idtag=" + idtag + ", identradablog=" + identradablog + " ]";
    }
    
}
